<?php
namespace app\admin\model;

use think\Model;

class User extends Model
{
    protected $pk = 'uid';
    protected $table = 'xc_user';
    protected $autoWriteTimestamp = true;
    
   /**
     * 搜索器
     * @param $query
     * @param $value
     */
    public function searchNameAttr($query, $value)
    {
        if ($value) {
            $query->where('name', 'like', '%' . $value . '%');
        }
    }  
    
    
}


?>